<template>
<div>
  <!-- <img alt="Vue logo"
       src="./assets/logo.png" />
  <HelloWorld msg="Hello Vue 3.0 + Vite" /> -->
  <router-view />
  <button @click="add">点击</button>
</div>
</template>

<script>
import HelloWorld from "./components/HelloWorld.vue";
//Compositon API 组合式api
import {reactive, computed} from 'vue'
//reactive 响应式api

export default {
  name: "App",
  beforeCreate(){},
  components: {
    HelloWorld
  }
};
const double = computed({
})
const add = ()=>state.a++
//无论是值还是函数都需要通过return 暴露给外部使用
   return{
     //toRefs 有双向数据绑定功能
     ...toRefs(state),add
   }

const state = react
</script>
